home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 15 / macformat_15.iso / C de cerca / Codewarrior Lite / MacOS Support / Headers / ANSI Headers / limits.h < prev    next >
Text File  |  1995-12-29  |  1KB  |  73 lines

  1. /* limits.h standard header -- 8-bit version */
  2. #ifndef _LIMITS
  3. #define _LIMITS
  4. #ifndef _YVALS
  5. #include <yvals.h>
  6. #endif
  7. #if _BITS_BYTE != 8
  8.  #error <limits.h> assumes 8 bits per byte
  9. #endif
  10.  
  11. #if __MWERKS__
  12. #pragma options align=mac68k
  13.  
  14. #if __CFM68K__ && __USING_IMPORTED_ANSI__
  15. #pragma import on
  16. #endif
  17. #endif
  18.  
  19.         /* char properties */
  20. #define CHAR_BIT    8
  21. #if _CSIGN
  22. #define CHAR_MAX    127
  23. #define CHAR_MIN    (-127-_C2)
  24. #else
  25. #define CHAR_MAX    255
  26. #define CHAR_MIN    0
  27. #endif
  28.         /* int properties */
  29. #if _ILONG
  30. #define INT_MAX        2147483647
  31. #define INT_MIN        (-2147483647-_C2)
  32. #define UINT_MAX    4294967295U
  33. #else
  34. #define INT_MAX        32767
  35. #define INT_MIN        (-32767-_C2)
  36. #define UINT_MAX    65535U
  37. #endif
  38.         /* long properties */
  39. #define LONG_MAX    2147483647
  40. #define LONG_MIN    (-2147483647-_C2)
  41.         /* multibyte properties */
  42. #define MB_LEN_MAX    _MBMAX
  43.         /* signed char properties */
  44. #define SCHAR_MAX    127
  45. #define SCHAR_MIN    (-127-_C2)
  46.         /* short properties */
  47. #define SHRT_MAX    32767
  48. #define SHRT_MIN    (-32767-_C2)
  49.         /* unsigned properties */
  50. #define UCHAR_MAX    255U
  51. #define ULONG_MAX    4294967295U
  52. #define USHRT_MAX    65535U
  53.  
  54. #if __MWERKS__
  55. #if __CFM68K__ && __USING_IMPORTED_ANSI__
  56. #pragma import reset
  57. #endif
  58.  
  59. #pragma options align=reset
  60. #endif
  61.  
  62. #endif
  63.  
  64. /*
  65.  * Copyright (c) 1994 by P.J. Plauger.  ALL RIGHTS RESERVED. 
  66.  * Consult your license regarding permissions and restrictions.
  67.  */
  68.  
  69. /* Change log:
  70.  *94June04 PlumHall baseline
  71.  *94Oct07 Inserted MW changes.
  72.  */
  73.